/*4.混合器*/
//不带参数的
@mixin my_border{
  border: 1px solid #f00;
  box-shadow: 10px 10px 5px 5px #f00;
  border-radius: 50%;
}
//带参数的
@mixin my_border1($width, $style, $color, $size){
  border: $width $style $color;
  border-radius: $size;
}
//css hack
@mixin my_bg($fx, $color1, $color2){
  background: -webkit-linear-gradient($fx, $color1, $color2);
  background: -o-linear-gradient($fx, $color1, $color2);
  background: -moz-linear-gradient($fx, $color1, $color2);
  background: -ms-linear-gradient($fx, $color1, $color2);
}
/*例1: 无参数的混合器*/
div{
  width: 100px;
  //调用混合器
  @include my_border;
}
/*例2: 有参数的混合器*/
div{
  @include my_border1(3px, solid, #f00, 20%);
}
h2{
  @include my_border1(1px, dashed, red, 25%)
}
/*css hack*/
div{
  @include my_bg(top, #f00, #0ff);
}